package com.company.decorator;

/**
 * 装饰器(Decorator)角色，汽车装饰器类
 */
public class CarDecorator implements Car {
    protected Car decoratedCar;

    /**
     * 初始化汽车对象的引用
     */
    public CarDecorator(Car car) {
        decoratedCar = car;
    }

    @Override
    public String getDescription() {
        return decoratedCar.getDescription();
    }

    @Override
    public int getPrice() {
        return decoratedCar.getPrice();
    }
}
